class s2.fx.Queue
Description
Effect queues manage the execution of effects in parallel or end-to-end over time.
Methods
Instance methods
-
active #
s2.fx.Queue#active() -> BooleanReturns whether there are any effects currently running or queued up.
-
add #
s2.fx.Queue#add(effect) -> s2.fx.Queue-
effect(s2.fx.Base) – Effect to be queued
Add an effect to the queue. The effects' options can optionally contain a
positionoption that can be eitherparallel(the effect will start immediately) orend(the effect will start when the last of the currently queued effects end). Returns the Queue.fires: effect:queued
-
-
getEffects #
s2.fx.Queue#getEffects() -> ArrayReturns an array of any effects currently running or queued up.
-
remove #
s2.fx.Queue#remove(effect) -> s2.fx.Queue-
effect(s2.fx.Base) – Effect to be removed from the Queue.
Removes an effect from the Queue and destroys the effect. Returns the Queue.
fires: effect:dequeued
-
-
render #
s2.fx.Queue#render(timestamp) -> s2.fx.Queue-
timestamp(Date) – Timestamp given to the individual effects' render methods.
Renders all effects that are currently in the Queue. Returns the Queue.
-